<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="../../../static/css/style.css" rel="stylesheet" type="text/css" />
  <script type="text/javascript" src="../../../static/js/jquery.js"></script>
</head>

<body>
<div class="place"> <span>位置：</span>
  <ul class="placeul">
    <li>仓库管理</li>
    <li>仓库管理</li>
    <li>仓库详情</li>
  </ul>
</div>
<div class="formbody">
  <div class="formtitle"><span>仓库信息</span></div>
  <ul class="forminfo">
    <li>
      <label>仓库名称</label>
      <cite id="cname"></cite>
    </li>
    <li>
      <label>仓库地址</label>
      <cite id="caddress"></cite>
    </li>
    <li>
      <label>所属区域</label>
      <cite id="pcity"></cite>
    </li>
    <li>
      <label>负责人</label>
      <cite id="usre"></cite>
    </li>
    <li>
      <label>联系方式</label>
      <cite id="phone"></cite>
    </li>
    <li>
      <label>描述</label>
      <cite id="details"></cite>
    </li>
    <li>
      <label>状态</label>
      <cite id="state"></cite>
    </li>
    <li>
      <label>创建人</label>
      <cite id="users"></cite>
    </li>
    <li>
      <label>创建时间</label>
      <cite id="creationTime"></cite>
    </li>
    <li>
      <label>&nbsp;</label>
<!--      <a href="/storage/lists">-->
        <input name="" type="button" onclick="window.history.go(-1);" class="btn" value="返回" />
<!--      </a>-->
    </li>
  </ul>
</div>
<script>
  var WarehouseID;
  $(function () {
    loadstorage();
    WarehouseID = getParameter("WarehouseID");
  });

  function getParameter(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
    var r = location.search.substr(1).match(reg);
    if (r != null) {
      return (r[2]);
    }
    return null;
  }


  function loadstorage() {
    $.ajax({
      type: "GET",//请求类型
      url: "/Warehouse/WarehouseDetail",//请求的url
      data: {
        WarehouseID:WarehouseID
      },//请求参数
      dataType: "json",//ajax接口（请求url）返回的数据类型
      success: function (pb) {
        $("#cname").html(pb.data.cname)
        $("#caddress").html(pb.data.caddress)
        $("#pcity").html(pb.data.province+'省'+pb.data.city+'市')
        $("#usre").html(pb.data.usre)
        $("#phone").html(pb.data.phone)
        $("#details").html(pb.data.details)
        if(pb.data.state=="0")
          $("#state").html("不可用")
        else
          $("#state").html("可用")
        $("#users").html(pb.data.users)
        $("#creationTime").html(pb.data.creationTime)

        // alert(pb.msg)
      }
    })
  }
</script>
</body>
</html>
